package com.itheima.chapter06.extends1.constructor;

public class Person {
    private String name;
    private int age;

    int num=10;


   /* public Person(){
        super();//默认继承Object
        System.out.println("我是父类空参数构造方法");
    }

    public  Person(String name,int age){
        this.name=name;
        this.age=age;
        System.out.println("我是父类有参数构造方法");
    }
*/

    public Person() {
    }

    public Person(String name, int age) {
        this.name = name;
        this.age = age;

    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
